<div id="main-wrapper">
    <div class="container-12">

        <div id="main" class="clearfix">

            <div id="content" class="column grid-8" role="main">
                <div class="section">

                    <div class="page-content">
                        <div class="region region-content">
                            <div id="block-system-main" class="block block-system block-even">
                                <div class="block-title">
                                </div>
                                <div class="content">
                                    <div class="panel-flexible panels-flexible-4 clearfix">
                                        <div class="panel-flexible-inside panels-flexible-4-inside">
                                            <div class="panels-flexible-region panels-flexible-region-4-center panels-flexible-region-first panels-flexible-region-last">
                                                <div class="inside panels-flexible-region-inside panels-flexible-region-4-center-inside panels-flexible-region-inside-first panels-flexible-region-inside-last">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- /.content -->
                            </div>
                            <!-- /.block -->
                            <section id="block-views-all-news-block" class="block block-views block-odd">
                                <div class="block-title">
                                    <h3><?php echo $titulo; ?></h3>
                                </div>

                                <div class="content">
                                    <div class="view view-all-news view-id-all_news view-display-id-block view-dom-id-bed07e465968c8ec9e4f6e6bca2dd067">
                                        <div class="view-content">
                                            <div class="views-row views-row-1 views-row-odd views-row-first">
                                                <?php echo $texto; ?>
                                            </div>

                                        </div>
                                    </div>		
                                </div>
                                <!-- /.content -->
                            </section>
                            <!-- /.block -->  
                        </div>
                    </div>
                </div>
            </div>

            <aside id="sidebar-second-" class="column column_right sidebar grid-4" role="complementary">
                <div class="section">
                    <div class="region region-sidebar-second">
                        <section id="block-views-hot-songs-block" class="block block-views block-even">
                            <div class="block-title">
                                <h3>Últimos tweets</h3>
                            </div>

                            <div class="content">
                                <div class="view view-hot-songs view-id-hot_songs view-display-id-block">
                                    <div class="view-content">
                                        <?php 
                                        if($user != null){
                                        ?>
                                        <div class="views-row views-row-1 views-row-odd views-row-first">
                                            
                                            <div class="views-field views-field-field-image" style="padding-bottom: 15px; margin-right: 0;">        
                                                <div class="field-content">
                                                    <img src="<?php echo str_replace('normal', 'bigger', $user->profile_image_url); ?>" width="63" height="59" alt="">
                                                </div>  
                                            </div>  
                                            <div class="views-field views-field-title" style="margin-bottom: 10px;">        
                                                <h3 class="field-content">
                                                    <?php echo $user->name; ?>
                                                </h3> 
                                                <h5>
                                                    <a href="https://twitter.com/autoridadedacom" style="text-transform: lowercase;"><?php echo '@' . $user->screen_name; ?></a>
                                                </h5>
                                            </div>  
                                            <hr class="fancy-line"/>
                                            <div class="views-field views-field-body" style="text-align: justify;">  
                                                <?php
                                                if (!empty($tweets)) {

                                                    foreach ($tweets as $tweet) {
                                                        ?>
                                                        <div class="views-field">
                                                            <span style="color: #db3a20; font-size: 9px">
                                                                <?php
                                                                $date = new DateTime($tweet->created_at);
                                                                $date->setTimezone(new DateTimeZone('America/Sao_Paulo'));
                                                                echo 'Postado em ' . $date->format('d/m/Y H:i:s');
                                                                ?>
                                                            </span>
                                                            <br/>
                                                            <span class="field-content" style="text-transform: none;"><?php echo $tweet->text; ?></span>  
                                                            <br/>
                                                            <br/>
                                                            <?php
                                                        }
                                                    }
                                                    ?>
                                                </div>
                                            </div>  
                                        </div>
                                        <?php
                                        } else {
                                            echo "<i>Não foi possível conectar no Twitter</i>";
                                        }
                                        ?>
                                    </div>
                                </div>		
                            </div>
                            <!-- /.content -->
                        </section>
                        <!-- /.block -->
                    </div>
                </div>
            </aside>
        </div><!-- /#main -->
    </div>

</div>
<script type="text/javascript">
    jQuery(document).ready(function() {
        // aplicado classe para que o template não coloque width e height auto nas imagens
        var $img = jQuery('#conteudo-html').find('img');
        if ($img.length > 0) {
            $img.addClass('fixed-size');
        }
    });

</script>